import {
    group,
    displayName,
    displayLineStyleName,
    displaySurroundLineName,
    displayFillStyleName,
    displayNameDot,
    displayTextContentName,
    displayNameNew,
    fromCheckboxValue,
    fontAlignTypeValue,
    collectionPropertyGridRows,
} from './PublicStyleFunction'

export default class StylePanel2D {
    constructor(plotting) {
        this._plotting = plotting
    }
    collectionPropertyGridRows(fs) {
        return collectionPropertyGridRows(fs)
    }
    updateSelectFeature(updated, selectfeatures) {
        const transaction = new SuperMap.Plot.Transaction()
        this._plotting.getTransManager().add(transaction)

        for (let i = 0; i < selectfeatures.length; i++) {
            const transInfo = new SuperMap.Plot.TransactionInfo()
            transInfo.layerId = selectfeatures[i].layer._leaflet_id
            transInfo.uuid = selectfeatures[i].uuid
            if (updated != null) {
                switch (updated.name) {
                    case displayName[0]:
                        transInfo.functionName = 'setLocked'
                        transInfo.undoParams = [selectfeatures[i].getLocked()]
                        transInfo.redoParams = [
                            fromCheckboxValue(updated.value),
                        ]
                        selectfeatures[i].setLocked(
                            fromCheckboxValue(updated.value)
                        )
                        break
                    case displayName[1]:
                        transInfo.propertyName = 'display'
                        transInfo.undoValue = selectfeatures[i].style.display
                        transInfo.redoValue = updated.value
                        selectfeatures[i].setStyle({ display: updated.value })
                        break
                    case displayLineStyleName[0]:
                        transInfo.propertyName = 'weight'
                        transInfo.undoValue = selectfeatures[i].style.weight
                        transInfo.redoValue = parseInt(updated.value)
                        if (
                            selectfeatures[i].symbolType ===
                            SuperMap.Plot.SymbolType.LITERATESIGN
                        ) {
                            selectfeatures[i].route.applyTextStyle({
                                weight: parseInt(updated.value),
                            })
                        } else {
                            selectfeatures[i].setStyle({
                                weight: parseInt(updated.value),
                            })
                        }
                        break
                    case displayLineStyleName[1]:
                        transInfo.propertyName = 'color'
                        transInfo.undoValue = [selectfeatures[i].style.color]
                        transInfo.redoValue = [updated.value]
                        if (
                            selectfeatures[i].symbolType ===
                            SuperMap.Plot.SymbolType.LITERATESIGN
                        ) {
                            selectfeatures[i].route.applyTextStyle({
                                color: updated.value,
                            })
                        } else {
                            selectfeatures[i].setStyle({ color: updated.value })
                        }
                        break
                    case displayLineStyleName[2]:
                        transInfo.propertyName = 'lineSymbolID'
                        transInfo.undoValue =
                            selectfeatures[i].style.lineSymbolID
                        transInfo.redoValue = updated.value
                        if (
                            selectfeatures[i].symbolType ===
                            SuperMap.Plot.SymbolType.LITERATESIGN
                        ) {
                            selectfeatures[i].route.applyTextStyle({
                                lineSymbolID: updated.value,
                            })
                        } else {
                            selectfeatures[i].setStyle({
                                lineSymbolID: updated.value,
                            })
                        }
                        break
                    case displayLineStyleName[3]:
                        {
                            let opacity =
                                parseFloat(updated.value) < 0
                                    ? 0
                                    : parseFloat(updated.value)
                            opacity =
                                parseFloat(updated.value) > 1
                                    ? 1
                                    : parseFloat(updated.value)
                            transInfo.propertyName = 'opacity'
                            transInfo.undoValue =
                                selectfeatures[i].style.opacity
                            transInfo.redoValue = opacity
                            if (
                                selectfeatures[i].symbolType ===
                                SuperMap.Plot.SymbolType.LITERATESIGN
                            ) {
                                selectfeatures[i].route.applyTextStyle({
                                    opacity: opacity,
                                })
                            } else {
                                selectfeatures[i].setStyle({ opacity: opacity })
                            }
                        }
                        break
                    case displaySurroundLineName[0]:
                        transInfo.functionName = 'setSurroundLineType'
                        transInfo.undoParams = [
                            selectfeatures[i].getSurroundLineType(),
                        ]
                        transInfo.redoParams = [parseInt(updated.value)]
                        selectfeatures[i].setSurroundLineType(
                            parseInt(updated.value)
                        )
                        break
                    case displaySurroundLineName[1]:
                        transInfo.propertyName = 'surroundLineWidth'
                        transInfo.undoValue =
                            selectfeatures[i].style.surroundLineWidth
                        transInfo.redoValue = parseInt(updated.value)
                        selectfeatures[i].setStyle({
                            surroundLineWidth: parseInt(updated.value),
                        })
                        break
                    case displaySurroundLineName[2]:
                        transInfo.propertyName = 'surroundLineColor'
                        transInfo.undoValue =
                            selectfeatures[i].style.surroundLineColor
                        transInfo.redoValue = updated.value
                        selectfeatures[i].setStyle({
                            surroundLineColor: updated.value,
                        })
                        break
                    case displaySurroundLineName[3]:
                        {
                            let opacity =
                                parseFloat(updated.value) < 0
                                    ? 0
                                    : parseFloat(updated.value)
                            opacity =
                                parseFloat(updated.value) > 1
                                    ? 1
                                    : parseFloat(updated.value)
                            transInfo.propertyName = 'surroundLineColorOpacity'
                            transInfo.undoValue =
                                selectfeatures[i].style.surroundLineColorOpacity
                            transInfo.redoValue = opacity
                            selectfeatures[i].setStyle({
                                surroundLineColorOpacity: opacity,
                            })
                        }
                        break
                    case displayFillStyleName[0]:
                        transInfo.propertyName = 'fillSymbolID'
                        transInfo.undoValue =
                            selectfeatures[i].style.fillSymbolID
                        transInfo.redoValue = parseFloat(updated.value)
                        selectfeatures[i].style.fillSymbolID = parseFloat(
                            updated.value
                        )
                        selectfeatures[i].setStyle(selectfeatures[i].style)
                        break
                    case displayFillStyleName[1]:
                        transInfo.propertyName = 'fillColor'
                        transInfo.undoValue = selectfeatures[i].style.fillColor
                        transInfo.redoValue = updated.value
                        selectfeatures[i].style.fillColor = updated.value
                        selectfeatures[i].setStyle(selectfeatures[i].style)
                        break
                    case displayFillStyleName[2]:
                        {
                            let opacity =
                                parseFloat(updated.value) < 0
                                    ? 0
                                    : parseFloat(updated.value)
                            opacity =
                                parseFloat(updated.value) > 1
                                    ? 1
                                    : parseFloat(updated.value)
                            transInfo.propertyName = 'fillOpacity'
                            transInfo.undoValue =
                                selectfeatures[i].style.fillOpacity
                            transInfo.redoValue = opacity
                            selectfeatures[i].style.fillOpacity = opacity
                            selectfeatures[i].setStyle(selectfeatures[i].style)
                        }
                        break
                    case displayFillStyleName[3]:
                        transInfo.propertyName = 'fillGradientMode'
                        transInfo.undoValue =
                            selectfeatures[i].style.fillGradientMode
                        transInfo.redoValue = updated.value
                        selectfeatures[i].style.fillGradientMode = updated.value
                        selectfeatures[i].setStyle(selectfeatures[i].style)
                        break
                    case displayFillStyleName[4]:
                        transInfo.propertyName = 'fillBackColor'
                        transInfo.undoValue =
                            selectfeatures[i].style.fillBackColor
                        transInfo.redoValue = updated.value
                        selectfeatures[i].style.fillBackColor = updated.value
                        selectfeatures[i].setStyle(selectfeatures[i].style)
                        break
                    case displayFillStyleName[5]:
                        {
                            let opacity =
                                parseFloat(updated.value) < 0
                                    ? 0
                                    : parseFloat(updated.value)
                            opacity =
                                parseFloat(updated.value) > 1
                                    ? 1
                                    : parseFloat(updated.value)
                            transInfo.propertyName = 'fillBackOpacity'
                            transInfo.undoValue =
                                selectfeatures[i].style.fillBackOpacity
                            transInfo.redoValue = opacity
                            selectfeatures[i].style.fillBackOpacity = opacity
                            selectfeatures[i].setStyle(selectfeatures[i].style)
                        }
                        break
                    case displayFillStyleName[6]:
                        {
                            let angle =
                                parseFloat(updated.value) < 0
                                    ? 0
                                    : parseFloat(updated.value)
                            angle =
                                parseFloat(updated.value) >= 360
                                    ? 0
                                    : parseFloat(updated.value)
                            transInfo.propertyName = 'fillAngle'
                            transInfo.undoValue =
                                selectfeatures[i].style.fillAngle
                            transInfo.redoValue = angle
                            selectfeatures[i].style.fillAngle = angle
                            selectfeatures[i].setStyle(selectfeatures[i].style)
                        }
                        break
                    case displayFillStyleName[7]:
                        {
                            let X =
                                parseFloat(updated.value) < -1
                                    ? -1
                                    : parseFloat(updated.value)
                            X =
                                parseFloat(updated.value) > 1
                                    ? 1
                                    : parseFloat(updated.value)
                            transInfo.propertyName = 'fillCenterOffsetX'
                            transInfo.undoValue =
                                selectfeatures[i].style.fillCenterOffsetX
                            transInfo.redoValue = X
                            selectfeatures[i].style.fillCenterOffsetX = X
                            selectfeatures[i].setStyle(selectfeatures[i].style)
                        }
                        break

                    case displayFillStyleName[8]:
                        {
                            let Y =
                                parseFloat(updated.value) < -1
                                    ? -1
                                    : parseFloat(updated.value)
                            Y =
                                parseFloat(updated.value) > 1
                                    ? 1
                                    : parseFloat(updated.value)
                            transInfo.propertyName = 'fillCenterOffsetY'
                            transInfo.undoValue =
                                selectfeatures[i].style.fillCenterOffsetY
                            transInfo.redoValue = Y
                            selectfeatures[i].style.fillCenterOffsetY = Y
                            selectfeatures[i].setStyle(selectfeatures[i].style)
                        }
                        break
                    case displayNameDot[0]:
                        transInfo.functionName = 'setRotate'
                        transInfo.undoParams = [selectfeatures[i].getRotate()]
                        transInfo.redoParams = [parseFloat(updated.value)]
                        selectfeatures[i].setRotate(parseFloat(updated.value))
                        break
                    case displayNameDot[1]:
                        transInfo.functionName = 'setScaleByMap'
                        transInfo.undoParams = [
                            selectfeatures[i].getScaleByMap(),
                        ]
                        transInfo.redoParams = [
                            fromCheckboxValue(updated.value),
                        ]
                        selectfeatures[i].setScaleByMap(
                            fromCheckboxValue(updated.value)
                        )
                        break
                    case displayNameDot[2]:
                        transInfo.functionName = 'setNegativeImage'
                        transInfo.undoParams = [
                            selectfeatures[i].getNegativeImage(),
                        ]
                        transInfo.redoParams = [
                            fromCheckboxValue(updated.value),
                        ]
                        selectfeatures[i].setNegativeImage(
                            fromCheckboxValue(updated.value)
                        )
                        break
                    case displayNameDot[3]:
                        transInfo.functionName = 'setSymbolRank'
                        transInfo.undoParams = [
                            selectfeatures[i].getSymbolRank(),
                        ]
                        transInfo.redoParams = [updated.value]
                        selectfeatures[i].setSymbolRank(updated.value)
                        break
                    case displayNameDot[4]:
                        transInfo.functionName = 'setPositionOffset'
                        transInfo.undoParams = [
                            selectfeatures[i].getPositionOffset(),
                        ]
                        transInfo.redoParams = [
                            fromCheckboxValue(updated.value),
                        ]
                        selectfeatures[i].setPositionOffset(
                            fromCheckboxValue(updated.value)
                        )
                        break
                    case displayNameDot[5]:
                        transInfo.functionName = 'setPositionOffsetType'
                        transInfo.undoParams = [
                            selectfeatures[i].getPositionOffsetType(),
                        ]
                        transInfo.redoParams = [parseInt(updated.value)]
                        selectfeatures[i].setPositionOffsetType(
                            parseInt(updated.value)
                        )
                        break
                    case displayNameDot[6]:
                        transInfo.functionName = 'setWidthHeightLimit'
                        transInfo.undoParams = [
                            selectfeatures[i].getWidthHeightLimit(),
                        ]
                        transInfo.redoParams = [
                            fromCheckboxValue(updated.value),
                        ]
                        selectfeatures[i].setWidthHeightLimit(
                            fromCheckboxValue(updated.value)
                        )
                        break
                    case displayNameDot[7]:
                        transInfo.functionName = 'setSymbolSize'
                        transInfo.undoParams = [
                            selectfeatures[i].getSymbolSize().w,
                        ]
                        transInfo.redoParams = [
                            parseFloat(updated.value),
                            selectfeatures[i].getSymbolSize().h,
                        ]
                        selectfeatures[i].setSymbolSize(
                            updated.value,
                            selectfeatures[i].getSymbolSize().h
                        )
                        break
                    case displayNameDot[8]:
                        transInfo.functionName = 'setSymbolSize'
                        transInfo.undoParams = [
                            selectfeatures[i].getSymbolSize().h,
                        ]
                        transInfo.redoParams = [
                            selectfeatures[i].getSymbolSize().w,
                            parseFloat(updated.value),
                        ]
                        selectfeatures[i].setSymbolSize(
                            selectfeatures[i].getSymbolSize().w,
                            updated.value
                        )
                        break
                    case displayTextContentName[0]:
                        if (
                            selectfeatures[i].symbolType ===
                            SuperMap.Plot.SymbolType.SYMBOLTEXT
                        ) {
                            transInfo.functionName = 'updateSymbolText'
                            transInfo.undoParams = [
                                selectfeatures[i].symbolTexts[0].clone(),
                                0,
                            ]
                            selectfeatures[i].symbolTexts[0].textContent =
                                updated.value
                            selectfeatures[i].updateSymbolText(
                                selectfeatures[i].symbolTexts[0],
                                0
                            )
                            transInfo.redoParams = [
                                selectfeatures[i].symbolTexts[0],
                                0,
                            ]
                        } else if (
                            selectfeatures[i].symbolType ===
                                SuperMap.Plot.SymbolType.SYMBOLTEXT1 ||
                            selectfeatures[i].symbolType ===
                                SuperMap.Plot.SymbolType.PATHTEXT
                        ) {
                            transInfo.functionName = 'setTextContent'
                            transInfo.undoParams = [
                                selectfeatures[i].getTextContent(),
                            ]
                            const updatedValueStr = updated.value
                            const textContent = updatedValueStr.split(',')
                            transInfo.redoParams = [textContent]
                            selectfeatures[i].setTextContent(textContent)
                        } else {
                            transInfo.functionName = 'setTextContent'
                            transInfo.undoParams = [
                                selectfeatures[i].getTextContent(),
                            ]
                            transInfo.redoParams = [updated.value]
                            selectfeatures[i].setTextContent(updated.value)
                        }
                        break
                    case displayTextContentName[0] + '2':
                        selectfeatures[i].symbolTexts[1].textContent =
                            updated.value
                        selectfeatures[i].redraw()
                        break
                    case displayTextContentName[1]:
                        if (
                            selectfeatures[i].symbolType ===
                            SuperMap.Plot.SymbolType.PATHTEXT
                        ) {
                            transInfo.functionName = 'setRelLineText'
                            transInfo.undoParams = [
                                selectfeatures[i].getRelLineText(),
                            ]
                            transInfo.redoParams = [parseInt(updated.value)]
                            selectfeatures[i].setRelLineText(
                                parseInt(updated.value)
                            )
                        } else {
                            transInfo.functionName = 'setTextPosition'
                            transInfo.undoParams = [
                                selectfeatures[i].getTextPosition(),
                            ]
                            transInfo.redoParams = [parseInt(updated.value)]
                            selectfeatures[i].setTextPosition(
                                parseInt(updated.value)
                            )
                        }
                        break
                    case displayTextContentName[2]:
                        transInfo.propertyName = 'fontSize'
                        transInfo.undoValue = selectfeatures[i].style.fontSize
                        transInfo.redoValue = parseFloat(updated.value)
                        selectfeatures[i].setStyle({
                            fontSize: parseFloat(updated.value),
                        })
                        break
                    case displayTextContentName[3]:
                        transInfo.propertyName = 'fontColor'
                        transInfo.undoValue = selectfeatures[i].style.fontColor
                        transInfo.redoValue = updated.value
                        selectfeatures[i].setStyle({ fontColor: updated.value })
                        break
                    case displayTextContentName[4]:
                        transInfo.propertyName = 'fontFamily'
                        transInfo.undoValue = selectfeatures[i].style.fontFamily
                        transInfo.redoValue = updated.value
                        selectfeatures[i].setStyle({
                            fontFamily: updated.value,
                        })
                        break
                    case displayTextContentName[5]:
                        if (
                            selectfeatures[i].symbolType ===
                            SuperMap.Plot.SymbolType.SYMBOLTEXT1
                        ) {
                            selectfeatures[i].space = updated.value
                        } else {
                            transInfo.functionName = 'setSpace'
                            transInfo.undoParams = [
                                selectfeatures[i].getSpace(),
                            ]
                            transInfo.redoParams = [parseInt(updated.value)]
                            selectfeatures[i].setSpace(parseInt(updated.value))
                        }
                        break
                    case displayTextContentName[6]:
                        transInfo.propertyName = 'fontSpace'
                        transInfo.undoValue = selectfeatures[i].style.fontSpace
                        transInfo.redoValue = parseInt(updated.value)
                        selectfeatures[i].style.fontSpace = parseInt(
                            updated.value
                        )
                        selectfeatures[i].setStyle(selectfeatures[i].style)
                        break
                    case displayTextContentName[7]:
                        transInfo.propertyName = 'fontPercent'
                        transInfo.undoValue =
                            selectfeatures[i].style.fontPercent
                        transInfo.redoValue = parseInt(updated.value)
                        selectfeatures[i].style.fontPercent = parseInt(
                            updated.value
                        )
                        selectfeatures[i].setStyle(selectfeatures[i].style)
                        break
                    case displayTextContentName[8]:
                        transInfo.propertyName = 'fontStroke'
                        transInfo.undoValue = selectfeatures[i].style.fontStroke
                        transInfo.redoValue = fromCheckboxValue(updated.value)
                        selectfeatures[i].style.fontStroke = fromCheckboxValue(
                            updated.value
                        )
                        selectfeatures[i].setStyle(selectfeatures[i].style)
                        break
                    case displayTextContentName[9]:
                        transInfo.propertyName = 'fontStrokeColor'
                        transInfo.undoValue =
                            selectfeatures[i].style.fontStrokeColor
                        transInfo.redoValue = updated.value
                        selectfeatures[i].style.fontStrokeColor = updated.value
                        selectfeatures[i].setStyle(selectfeatures[i].style)
                        break
                    case displayTextContentName[10]:
                        transInfo.propertyName = 'fontStrokeWidth'
                        transInfo.undoValue =
                            selectfeatures[i].style.fontStrokeWidth
                        transInfo.redoValue = parseInt(updated.value)
                        selectfeatures[i].style.fontStrokeWidth = parseInt(
                            updated.value
                        )
                        selectfeatures[i].setStyle(selectfeatures[i].style)
                        break
                    case displayTextContentName[11]:
                        transInfo.propertyName = 'fontBackground'
                        transInfo.undoValue =
                            selectfeatures[i].style.fontBackground
                        transInfo.redoValue = fromCheckboxValue(updated.value)
                        selectfeatures[i].style.fontBackground =
                            fromCheckboxValue(updated.value)
                        selectfeatures[i].setStyle(selectfeatures[i].style)
                        break
                    case displayTextContentName[12]:
                        transInfo.propertyName = 'fontBackgroundColor'
                        transInfo.undoValue =
                            selectfeatures[i].style.fontBackgroundColor
                        transInfo.redoValue = updated.value
                        selectfeatures[i].style.fontBackgroundColor =
                            updated.value
                        selectfeatures[i].setStyle(selectfeatures[i].style)
                        break
                    case displayTextContentName[13]:
                        transInfo.propertyName = 'fontShadow'
                        transInfo.undoValue = selectfeatures[i].style.fontShadow
                        transInfo.redoValue = fromCheckboxValue(updated.value)
                        selectfeatures[i].style.fontShadow = fromCheckboxValue(
                            updated.value
                        )
                        selectfeatures[i].setStyle(selectfeatures[i].style)
                        break
                    case displayTextContentName[14]:
                        transInfo.propertyName = 'fontShadowColor'
                        transInfo.undoValue =
                            selectfeatures[i].style.fontShadowColor
                        transInfo.redoValue = updated.value
                        selectfeatures[i].style.fontShadowColor = updated.value
                        selectfeatures[i].setStyle(selectfeatures[i].style)
                        break
                    case displayTextContentName[15]:
                        transInfo.propertyName = 'fontShadowOffsetX'
                        transInfo.undoValue =
                            selectfeatures[i].style.fontShadowOffsetX
                        transInfo.redoValue = parseInt(updated.value)
                        selectfeatures[i].style.fontShadowOffsetX = parseInt(
                            updated.value
                        )
                        selectfeatures[i].setStyle(selectfeatures[i].style)
                        break
                    case displayTextContentName[16]:
                        transInfo.propertyName = 'fontShadowOffsetY'
                        transInfo.undoValue =
                            selectfeatures[i].style.fontShadowOffsetY
                        transInfo.redoValue = parseInt(updated.value)
                        selectfeatures[i].style.fontShadowOffsetY = parseInt(
                            updated.value
                        )
                        selectfeatures[i].setStyle(selectfeatures[i].style)
                        break
                    case displayNameNew[0]:
                        transInfo.functionName = 'setArrowHeadType'
                        transInfo.undoParams = [
                            selectfeatures[i].getArrowHeadType(),
                        ]
                        transInfo.redoParams = [parseInt(updated.value)]
                        selectfeatures[i].setArrowHeadType(
                            parseInt(updated.value)
                        )
                        break
                    case displayNameNew[1]:
                        transInfo.functionName = 'setArrowBodyType'
                        transInfo.undoParams = [
                            selectfeatures[i].getArrowBodyType(),
                        ]
                        transInfo.redoParams = [parseInt(updated.value)]
                        selectfeatures[i].setArrowBodyType(
                            parseInt(updated.value)
                        )
                        break
                    case displayNameNew[2]:
                        transInfo.functionName = 'setArrowTailType'
                        transInfo.undoParams = [
                            selectfeatures[i].getArrowTailType(),
                        ]
                        transInfo.redoParams = [parseInt(updated.value)]
                        selectfeatures[i].setArrowTailType(
                            parseInt(updated.value)
                        )
                        break
                    case displayNameNew[3]:
                        transInfo.functionName = 'setStartArrowType'
                        transInfo.undoParams = [
                            selectfeatures[i].getStartArrowType(),
                        ]
                        transInfo.redoParams = [parseInt(updated.value)]
                        selectfeatures[i].setStartArrowType(
                            parseInt(updated.value)
                        )
                        break
                    case displayNameNew[4]:
                        transInfo.functionName = 'setEndArrowType'
                        transInfo.undoParams = [
                            selectfeatures[i].getEndArrowType(),
                        ]
                        transInfo.redoParams = [parseInt(updated.value)]
                        selectfeatures[i].setEndArrowType(
                            parseInt(updated.value)
                        )
                        break
                    case displayNameNew[5]:
                        transInfo.functionName = 'setShowPathLine'
                        transInfo.undoParams = [
                            selectfeatures[i].getShowPathLine(),
                        ]
                        transInfo.redoParams = [
                            fromCheckboxValue(updated.value),
                        ]
                        selectfeatures[i].setShowPathLine(
                            fromCheckboxValue(updated.value)
                        )
                        break
                    case displayNameNew[6]:
                        transInfo.functionName = 'setCurveLine'
                        transInfo.undoParams = [
                            selectfeatures[i].getIsCurveLine(),
                        ]
                        transInfo.redoParams = [
                            fromCheckboxValue(updated.value),
                        ]
                        selectfeatures[i].setCurveLine(
                            fromCheckboxValue(updated.value)
                        )
                        break
                    case displayNameNew[7]:
                        transInfo.functionName = 'setShowPathLineArrow'
                        transInfo.undoParams = [
                            selectfeatures[i].getShowPathLineArrow(),
                        ]
                        transInfo.redoParams = [
                            fromCheckboxValue(updated.value),
                        ]
                        selectfeatures[i].setShowPathLineArrow(
                            fromCheckboxValue(updated.value)
                        )
                        break
                    case displayNameNew[8]:
                        transInfo.functionName = 'setAvoidLine'
                        transInfo.undoParams = [
                            selectfeatures[i].getIsAvoidLine(),
                        ]
                        transInfo.redoParams = [
                            fromCheckboxValue(updated.value),
                        ]
                        selectfeatures[i].setAvoidLine(
                            fromCheckboxValue(updated.value)
                        )
                        break
                    case displayNameNew[9]:
                        transInfo.functionName = 'setTextBoxType'
                        transInfo.undoParams = [
                            selectfeatures[i].getTextBoxType(),
                        ]
                        transInfo.redoParams = [parseInt(updated.value)]
                        selectfeatures[i].setTextBoxType(
                            parseInt(updated.value)
                        )
                        break
                    case displayNameNew[10]:
                        transInfo.functionName = 'setRoundBox'
                        transInfo.undoParams = [selectfeatures[i].getRoundBox()]
                        transInfo.redoParams = [
                            fromCheckboxValue(updated.value),
                        ]
                        selectfeatures[i].setRoundBox(
                            fromCheckboxValue(updated.value)
                        )
                        break
                    case displayNameNew[11]:
                        transInfo.functionName = 'setFrame'
                        transInfo.undoParams = [selectfeatures[i].getFrame()]
                        transInfo.redoParams = [
                            fromCheckboxValue(updated.value),
                        ]
                        selectfeatures[i].setFrame(
                            fromCheckboxValue(updated.value)
                        )
                        break
                    case displayNameNew[12]:
                        transInfo.functionName = 'setRadiusLineType'
                        transInfo.undoParams = [
                            selectfeatures[i].getRadiusLineType(),
                        ]
                        transInfo.redoParams = [parseInt(updated.value)]
                        selectfeatures[i].setRadiusLineType(
                            parseInt(updated.value)
                        )
                        break
                    case displayNameNew[13]:
                        transInfo.functionName = 'setRadiusTextPos'
                        transInfo.undoParams = [
                            selectfeatures[i].getRadiusTextPos(),
                        ]
                        transInfo.redoParams = [updated.value]
                        selectfeatures[i].setRadiusTextPos(updated.value)
                        break
                    case displayNameNew[14]:
                        transInfo.functionName = 'setRadiusText'
                        transInfo.undoParams = [
                            selectfeatures[i].radiusText[0],
                            0,
                        ]
                        transInfo.redoParams = [updated.value, 0]
                        selectfeatures[i].setRadiusText(updated.value, 0)
                        break
                    case displayNameNew[15]:
                        transInfo.functionName = 'setRadiusText'
                        transInfo.undoParams = [
                            selectfeatures[i].radiusText[1],
                            1,
                        ]
                        transInfo.redoParams = [updated.value, 1]
                        selectfeatures[i].setRadiusText(updated.value, 1)
                        break
                    case displayNameNew[16]:
                        transInfo.functionName = 'setVisible'
                        transInfo.undoParams = [selectfeatures[i].getVisible()]
                        transInfo.redoParams = [
                            fromCheckboxValue(updated.value),
                        ]
                        selectfeatures[i].setVisible(
                            fromCheckboxValue(updated.value)
                        )
                        break
                    case displayNameNew[17]:
                        transInfo.functionName = 'setType'
                        transInfo.undoParams = [
                            selectfeatures[i].routeNode.type,
                        ]
                        transInfo.redoParams = [updated.value]
                        selectfeatures[i].setType(updated.value)
                        break
                    case displayNameNew[18]:
                        transInfo.functionName = 'setRotate'
                        transInfo.undoParams = [selectfeatures[i].getRotate()]
                        transInfo.redoParams = [parseFloat(updated.value)]
                        selectfeatures[i].setRotate(parseFloat(updated.value))
                        break
                    case displayNameNew[19]:
                        transInfo.functionName = 'setLineRelationType'
                        transInfo.undoParams = [
                            selectfeatures[i].getLineRelationType(),
                        ]
                        transInfo.redoParams = [parseInt(updated.value)]
                        selectfeatures[i].setLineRelationType(
                            parseInt(updated.value)
                        )
                        break
                    case displayNameNew[20]:
                        transInfo.functionName =
                            'setPolylineConnectLocationPoint'
                        transInfo.undoParams = [
                            selectfeatures[i].getPolylineConnectLocationPoint(),
                        ]
                        transInfo.redoParams = [
                            fromCheckboxValue(updated.value),
                        ]
                        selectfeatures[i].setPolylineConnectLocationPoint(
                            fromCheckboxValue(updated.value)
                        )
                        break
                    case displayNameNew[21]:
                        transInfo.functionName = 'setFontAlign'
                        transInfo.undoParams = [
                            selectfeatures[i].style.labelAlign,
                        ]
                        transInfo.redoParams = [
                            fontAlignTypeValue(updated.value),
                        ]
                        selectfeatures[i].setFontAlign(
                            fontAlignTypeValue(updated.value)
                        )
                        break
                }
                if (updated.group == group[8]) {
                    if (updated.name == displayName[2]) {
                        if (updated.value !== null) {
                            transInfo.propertyName = 'libID'
                            transInfo.undoValue =
                                selectfeatures[i].getSubSymbols()[
                                    updated.index
                                ].libID
                            transInfo.redoValue = parseInt(updated.value)
                            selectfeatures[i].subSymbols[0].libID = parseInt(
                                updated.value
                            )
                        }
                    }
                    if (updated.name == displayName[3]) {
                        const code = parseInt(updated.value)
                        if (
                            selectfeatures[i].symbolType ===
                                SuperMap.Plot.SymbolType.NODECHAIN &&
                            code != null
                        ) {
                            const symbolLibManager =
                                this._plotting.getSymbolLibManager()
                            const subCode =
                                symbolLibManager.findSymbolByCode(code)
                            if (
                                subCode.length !== 0 &&
                                subCode[0].symbolType === 'SYMBOL_DOT'
                            ) {
                                transInfo.functionName = 'setSubSymbol'
                                if (
                                    selectfeatures[i].getSubSymbols()[
                                        updated.index
                                    ]
                                ) {
                                    transInfo.undoParams = [
                                        selectfeatures[i].getSubSymbols()[
                                            updated.index
                                        ].code,
                                        updated.index,
                                        subCode[0].libID,
                                    ]
                                } else {
                                    transInfo.undoParams = [-1, updated.index]
                                }
                                transInfo.redoParams = [
                                    code,
                                    updated.index,
                                    subCode[0].libID,
                                ]
                                selectfeatures[i].setSubSymbol(
                                    code,
                                    updated.index,
                                    subCode[0].libID
                                )
                            }
                        } else if (code !== null) {
                            transInfo.functionName = 'setSubSymbol'
                            if (
                                selectfeatures[i].getSubSymbols()[updated.index]
                            ) {
                                transInfo.undoParams = [
                                    selectfeatures[i].getSubSymbols()[
                                        updated.index
                                    ].code,
                                    updated.index,
                                    selectfeatures[i].getSubSymbols()[
                                        updated.index
                                    ].libID,
                                ]
                            } else {
                                transInfo.undoParams = [-1, updated.index]
                            }
                            transInfo.redoParams = [code, updated.index]
                            selectfeatures[i].setSubSymbol(code, updated.index)
                        }
                    }
                }
                transaction.transInfos.push(transInfo)
            }
        }
    }
}
